home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.3 / GetFontStr.3 < prev    next >
Text File  |  1995-07-25  |  7KB  |  133 lines

  1.  
  2.  
  3.  
  4.      TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((3333))))          TTTTkkkk (((( ))))           TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((3333))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           Tk_GetFontStruct, Tk_NameOfFontStruct,  Tk_FreeFontStruct  -
  12.           maintain database of fonts
  13.  
  14.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  15.           ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  16.  
  17.           XFontStruct *
  18.           TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((_i_n_t_e_r_p, _t_k_w_i_n, _n_a_m_e_I_d))))
  19.  
  20.           char *
  21.           TTTTkkkk____NNNNaaaammmmeeeeOOOOffffFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((_f_o_n_t_S_t_r_u_c_t_P_t_r))))
  22.  
  23.           TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((_f_o_n_t_S_t_r_u_c_t_P_t_r))))
  24.  
  25.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  26.           Tcl_Interp    *_i_n_t_e_r_p          (in)      Interpreter to  use
  27.                                                    for           error
  28.                                                    reporting.
  29.  
  30.           Tk_Window     _t_k_w_i_n            (in)      Token for window in
  31.                                                    which  font will be
  32.                                                    used.
  33.  
  34.           Tk_Uid        _n_a_m_e_I_d           (in)      Name   of   desired
  35.                                                    font.
  36.  
  37.           XFontStruct   *_f_o_n_t_S_t_r_u_c_t_P_t_r   (in)      Font  structure  to
  38.                                                    return  name for or
  39.                                                    delete.
  40.      _________________________________________________________________
  41.  
  42.  
  43.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  44.           TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt loads the font indicated by _n_a_m_e_I_d and returns  a
  45.           pointer to information about the font.  The pointer returned
  46.           by TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt will remain valid until TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnntttt is  called
  47.           to release it.  _N_a_m_e_I_d can be either a font name or pattern;
  48.           any value that could be  passed  to  XXXXLLLLooooaaaaddddQQQQuuuueeeerrrryyyyFFFFoooonnnntttt  may  be
  49.           passed   to   TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt.   If  TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt  is  unsuccessful
  50.           (because, for example, there is  no  font  corresponding  to
  51.           _n_a_m_e_I_d)  then it returns NNNNUUUULLLLLLLL and stores an error message in
  52.           _i_n_t_e_r_p->_r_e_s_u_l_t.
  53.  
  54.           TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt  maintains  a  database  of  all  fonts  it   has
  55.           allocated.   If  the same _n_a_m_e_I_d is requested multiple times
  56.           (e.g. by different windows or for different purposes),  then
  57.           additional  calls  for  the same _n_a_m_e_I_d will be handled very
  58.           quickly, without involving the X server.  For  this  reason,
  59.           it  is  generally  better  to  use  TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt in place of X
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/23/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((3333))))          TTTTkkkk (((( ))))           TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt((((3333))))
  71.  
  72.  
  73.  
  74.           library procedures like XXXXLLLLooooaaaaddddQQQQuuuueeeerrrryyyyFFFFoooonnnntttt.
  75.  
  76.           The procedure TTTTkkkk____NNNNaaaammmmeeeeOOOOffffFFFFoooonnnnttttSSSSttttrrrruuuucccctttt is roughly the inverse  of
  77.           TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt.  If its _f_o_n_t_S_t_r_u_c_t_P_t_r argument was created
  78.           by TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt, then the return  value  is  the  _n_a_m_e_I_d
  79.           argument  that  was passed to TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt to create the
  80.           font.  If  _f_o_n_t_S_t_r_u_c_t_P_t_r  was  not  created  by  a  call  to
  81.           TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt,  then  the  return  value is a hexadecimal
  82.           string giving the X  identifier  for  the  associated  font.
  83.           Note:   the  string  returned by TTTTkkkk____NNNNaaaammmmeeeeOOOOffffFFFFoooonnnnttttSSSSttttrrrruuuucccctttt is only
  84.           guaranteed   to   persist   until   the   next    call    to
  85.           TTTTkkkk____NNNNaaaammmmeeeeOOOOffffFFFFoooonnnnttttSSSSttttrrrruuuucccctttt.
  86.  
  87.           When a font returned by  TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt  is  no  longer  needed,
  88.           TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnntttt should be called to release it.  There should be
  89.           exactly one call to TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnntttt for each call to TTTTkkkk____GGGGeeeettttFFFFoooonnnntttt.
  90.           When  a  font is no longer in use anywhere (i.e. it has been
  91.           freed as many times as it has been gotten) TTTTkkkk____FFFFrrrreeeeeeeeFFFFoooonnnntttt  will
  92.           release it to the X server and delete it from the database.
  93.  
  94.  
  95.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  96.           font
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 7/23/95)
  130.  
  131.  
  132.  
  133.